package cn.com.jtang.wedding.service;

import java.util.List;
import java.util.Map;

import cn.com.jtang.wedding.model.AdminUser;

public interface AdminUserManager {
	
	//添加渠道或总代
	public String add(AdminUser adminUser);
	
	//删除渠道或总代
	public int delete(AdminUser adminUser);
	
	//删除渠道或总代
	public int delete(Long id);
	
	//查看管理员
	public AdminUser queryById(long id);
	

	//购买的次数减一,如不能减,返回false为失败
	public boolean decreaseTimes(AdminUser adminUser);
	
	//购买的失败后,要加回减去的次数,返回false为失败
	public void increaseTimes(AdminUser adminUser);
	
	//通过adminUserAccount查询adminUser
	public AdminUser queryByAdminAccount(String adminUserAccount);
	
	public int update(AdminUser adminUser);

	public int getCount(Map<String, Object> map);
	
	public List<AdminUser> queryAll(Map<String, Object> map ,int start,int end);
}
